<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html;charset=utf-8" isELIgnored="false" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>


<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>欢迎来到学习页面</title>
    <link rel="icon" href="favicon.ico" type="image/ico">

    <meta name="author" content="yinqi">
    <link href="${base}/css/bootstrap.min.css" rel="stylesheet">
    <link href="${base}/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="${base}/css/style.min.css" rel="stylesheet">
</head>
<style>
    body{
       background-color: #2ad0f4;

    }
</style>
<body>

<div class="container-fluid bj1">

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-toolbar clearfix">
                </div>
                <div class="card-body">

                    <div class="table-responsive">

                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>
                                    <label class="lyear-checkbox checkbox-primary">
                                        <input type="checkbox" id="check-all"><span></span>
                                    </label>
                                </th>
                                <th>标题</th>
                                <th>内容</th>
                                <th>创建时间</th>
                                <th>是否共享</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <c:forEach var="a" items="${p.list}">
                                <tr>
                                    <td>
                                        <label class="lyear-checkbox checkbox-primary">
                                            <input type="checkbox" name="ids[]" value="1"><span></span>
                                        </label>
                                    </td>

                                    <td>${a.title}</td>
                                    <td>${a.content}</td>
                                    <td><fmt:formatDate value="${a.rdate}" pattern="yyyy-MM-dd"/></td>
                                    <td>${a.share eq 0?"共享":"不共享"}</td>
                                    <td>
                                        <div class="btn-group">
                                        <c:if test="${user.id==note.id}">
                                            <c:choose>
                                                <c:when test="${note.shares==0}"><span>已共享</span></c:when>
                                                <c:when test="${note.shares==1}">
                                                    <a href="javascript:void(0)" onclick=y(${note.nid})>分享</a>
                                                </c:when>
                                            </c:choose>
                                        </c:if>

                                            <a class="btn btn-xs btn-default" href="${base}/studys/toshow?nid=${a.nid}" title="查看" data-toggle="tooltip"><i class="mdi mdi-eye"></i></a>
                                            <a class="btn btn-xs btn-default" href="${base}/studys/downloadFile"  title="下载" data-toggle="tooltip"><i class="mdi mdi-debug-step-into"></i></a>
                                        </div>
                                    </td>

                                </tr>
                            </c:forEach>
                            </tbody>
                        </table>
                        <a class="btn btn-default" href="${pageContext.request.contextPath}/study/toCase">返 回</a>
                    </div>
                    <ul class="pagination">
                        <li><span><a href="${base}/studys/stushow?pageNum=${p.prePage}">«</a></span></li>
                        <c:forEach items="${p.navigatepageNums}" var="i">
                            <li <c:if test="${i eq p.pageNum}">class="active"</c:if>  ><a href="${base}/studys/stushow?pageNum=${i}">${i}</a></span></li>
                        </c:forEach>
                        <li><span><a href="${base}/studys/stushow?pageNum=${p.nextPage}">»</a></span></li>
                    </ul>

                </div>
            </div>
        </div>

    </div>

</div>
<script type="text/javascript" src="${base}/js/jquery.min.js"></script>
<script type="text/javascript" src="${base}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${base}/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="${base}/js/main.min.js"></script>
<script type="text/javascript">
    $(function(){
        $('.search-bar .dropdown-menu a').click(function() {
            var field = $(this).data('field') || '';
            $('#search-field').val(field);
            $('#search-btn').html($(this).text() + ' <span class="caret"></span>');
        });
    });

</script>
</body>
</html>